Optimal. Leaf size=62 \[ \frac{4 \sin (c+d x)}{a^3 d}+\frac{4 i \cos (c+d x)}{a^3 d}+\frac{i \sec (c+d x)}{a^3 d}-\frac{3 \tanh ^{-1}(\sin (c+d x))}{a^3 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.161956, antiderivative size = 62, normalized size of antiderivative = 1., number of steps used = 11, number of rules used = 9, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.29, Rules used = {3092, 3090, 2637, 2638, 2592, 321, 206, 2590, 14} \[ \frac{4 \sin (c+d x)}{a^3 d}+\frac{4 i \cos (c+d x)}{a^3 d}+\frac{i \sec (c+d x)}{a^3 d}-\frac{3 \tanh ^{-1}(\sin (c+d x))}{a^3 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3092
Rule 3090
Rule 2637
Rule 2638
Rule 2592
Rule 321
Rule 206
Rule 2590
Rule 14
Rubi steps
\begin{align*} \int \frac{\sec ^2(c+d x)}{(a \cos (c+d x)+i a \sin (c+d x))^3} \, dx &=\frac{i \int \sec ^2(c+d x) (i a \cos (c+d x)+a \sin (c+d x))^3 \, dx}{a^6}\\ &=\frac{i \int \left (-i a^3 \cos (c+d x)-3 a^3 \sin (c+d x)+3 i a^3 \sin (c+d x) \tan (c+d x)+a^3 \sin (c+d x) \tan ^2(c+d x)\right ) \, dx}{a^6}\\ &=\frac{i \int \sin (c+d x) \tan ^2(c+d x) \, dx}{a^3}-\frac{(3 i) \int \sin (c+d x) \, dx}{a^3}+\frac{\int \cos (c+d x) \, dx}{a^3}-\frac{3 \int \sin (c+d x) \tan (c+d x) \, dx}{a^3}\\ &=\frac{3 i \cos (c+d x)}{a^3 d}+\frac{\sin (c+d x)}{a^3 d}-\frac{i \operatorname{Subst}\left (\int \frac{1-x^2}{x^2} \, dx,x,\cos (c+d x)\right )}{a^3 d}-\frac{3 \operatorname{Subst}\left (\int \frac{x^2}{1-x^2} \, dx,x,\sin (c+d x)\right )}{a^3 d}\\ &=\frac{3 i \cos (c+d x)}{a^3 d}+\frac{4 \sin (c+d x)}{a^3 d}-\frac{i \operatorname{Subst}\left (\int \left (-1+\frac{1}{x^2}\right ) \, dx,x,\cos (c+d x)\right )}{a^3 d}-\frac{3 \operatorname{Subst}\left (\int \frac{1}{1-x^2} \, dx,x,\sin (c+d x)\right )}{a^3 d}\\ &=-\frac{3 \tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac{4 i \cos (c+d x)}{a^3 d}+\frac{i \sec (c+d x)}{a^3 d}+\frac{4 \sin (c+d x)}{a^3 d}\\ \end{align*}
Mathematica [A] time = 0.314773, size = 109, normalized size = 1.76 \[ -\frac{i \sec ^3(c+d x) (\cos (d x)+i \sin (d x))^3 \left ((\tan (c+d x)-5 i) (\cos (2 c-d x)+i \sin (2 c-d x))+6 (\cos (3 c)+i \sin (3 c)) \tanh ^{-1}\left (\cos (c) \tan \left (\frac{d x}{2}\right )+\sin (c)\right )\right )}{a^3 d (\tan (c+d x)-i)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.196, size = 108, normalized size = 1.7 \begin{align*} 8\,{\frac{1}{d{a}^{3} \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) }}+{\frac{i}{d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) ^{-1}}-3\,{\frac{\ln \left ( \tan \left ( 1/2\,dx+c/2 \right ) +1 \right ) }{d{a}^{3}}}-{\frac{i}{d{a}^{3}} \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) ^{-1}}+3\,{\frac{\ln \left ( \tan \left ( 1/2\,dx+c/2 \right ) -1 \right ) }{d{a}^{3}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.6332, size = 444, normalized size = 7.16 \begin{align*} \frac{{\left (6 \, \cos \left (3 \, d x + 3 \, c\right ) + 6 \, \cos \left (d x + c\right ) + 6 i \, \sin \left (3 \, d x + 3 \, c\right ) + 6 i \, \sin \left (d x + c\right )\right )} \arctan \left (\cos \left (d x + c\right ), \sin \left (d x + c\right ) + 1\right ) +{\left (6 \, \cos \left (3 \, d x + 3 \, c\right ) + 6 \, \cos \left (d x + c\right ) + 6 i \, \sin \left (3 \, d x + 3 \, c\right ) + 6 i \, \sin \left (d x + c\right )\right )} \arctan \left (\cos \left (d x + c\right ), -\sin \left (d x + c\right ) + 1\right ) -{\left (-3 i \, \cos \left (3 \, d x + 3 \, c\right ) - 3 i \, \cos \left (d x + c\right ) + 3 \, \sin \left (3 \, d x + 3 \, c\right ) + 3 \, \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} + 2 \, \sin \left (d x + c\right ) + 1\right ) -{\left (3 i \, \cos \left (3 \, d x + 3 \, c\right ) + 3 i \, \cos \left (d x + c\right ) - 3 \, \sin \left (3 \, d x + 3 \, c\right ) - 3 \, \sin \left (d x + c\right )\right )} \log \left (\cos \left (d x + c\right )^{2} + \sin \left (d x + c\right )^{2} - 2 \, \sin \left (d x + c\right ) + 1\right ) + 12 \, \cos \left (2 \, d x + 2 \, c\right ) + 12 i \, \sin \left (2 \, d x + 2 \, c\right ) + 8}{{\left (-2 i \, a^{3} \cos \left (3 \, d x + 3 \, c\right ) - 2 i \, a^{3} \cos \left (d x + c\right ) + 2 \, a^{3} \sin \left (3 \, d x + 3 \, c\right ) + 2 \, a^{3} \sin \left (d x + c\right )\right )} d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 0.493061, size = 302, normalized size = 4.87 \begin{align*} -\frac{3 \,{\left (e^{\left (3 i \, d x + 3 i \, c\right )} + e^{\left (i \, d x + i \, c\right )}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} + i\right ) - 3 \,{\left (e^{\left (3 i \, d x + 3 i \, c\right )} + e^{\left (i \, d x + i \, c\right )}\right )} \log \left (e^{\left (i \, d x + i \, c\right )} - i\right ) - 6 i \, e^{\left (2 i \, d x + 2 i \, c\right )} - 4 i}{a^{3} d e^{\left (3 i \, d x + 3 i \, c\right )} + a^{3} d e^{\left (i \, d x + i \, c\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.20389, size = 151, normalized size = 2.44 \begin{align*} -\frac{\frac{3 \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} - \frac{3 \, \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} - \frac{2 \,{\left (4 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 5\right )}}{{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} - i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right )} a^{3}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]